#pragma once
#include <string>
#include "Image.h"
#include "Structure.h"

class LeNetINT8
{
private:
	const DL::Tensor4D<int8>* conv1Weight;
	const DL::Tensor1D<float>* conv1WeightScale;
	const DL::Tensor1D<float>* conv1Bias;
	float conv1OutputScale;
	float conv1OutputZero;
	const DL::Tensor4D<int8>* conv2Weight;
	const DL::Tensor1D<float>* conv2WeightScale;
	const DL::Tensor1D<float>* conv2Bias;
	float conv2OutputScale;
	int conv2OutputZero;
	const DL::Tensor2D<int8>* linear1Weight;
	const DL::Tensor1D<float>* linear1WeightScale;
	const DL::Tensor1D<float>* linear1Bias;
	float linear1OutputScale;
	int linear1OutputZero;
	const DL::Tensor2D<int8>* linear2Weight;
	const DL::Tensor1D<float>* linear2WeightScale;
	const DL::Tensor1D<float>* linear2Bias;
	float linear2OutputScale;
	int linear2OutputZero;
	const DL::Tensor2D<int8>* linear3Weight;
	const DL::Tensor1D<float>* linear3WeightScale;
	const DL::Tensor1D<float>* linear3Bias;
	float linear3OutputScale;
	int linear3OutputZero;
public:
	LeNetINT8(std::string paramsFile);
	~LeNetINT8();
	int GetResultIndex(Image& image);
	std::string GetResultLable(Image& image);
};